<%-- 
    Document   : actionAddQuestion
    Created on : Oct 29, 2009, 6:08:10 AM
    Author     : Administrator
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
            int id = Integer.parseInt(request.getParameter("subID"));
            String Ques = request.getParameter("ContentQuestion");
            float Mark = Float.parseFloat(request.getParameter("Mark"));
        %>
        <jsp:useBean id="ObjectQuestion" class="DAO.DAOAction" scope="request"  />
        <jsp:useBean id="Obj" class="DAO.Question" scope="request"/>
        <jsp:setProperty name="Obj" property="question" value="<%=Ques%>" />
        <jsp:setProperty name="Obj" property="mark" value="<%=Mark%>" /> 
        <%
            if(ObjectQuestion.insertQuestion(id,Obj) == true )
                {
                response.sendRedirect("../displayQuestion.jsp");
            }
            else
                {
                out.println("Khong thang cong");

            }

        %>
    </body>
</html>
